﻿<%@ Page Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="TemporadaList.aspx.cs" 
    Inherits="WebAppPlanProduccion.App.TemporadaList" %>

<asp:Content ID="HeaderContent" ContentPlaceHolderID="HeadContent" runat="server">
    <link href="/Styles/GridStyle.css" rel="stylesheet" type="text/css" />
    <link href="/Styles/Temporada.css" rel="stylesheet" type="text/css" />
    <link href="/Styles/jquery.datepick.css" rel="stylesheet" type="text/css" />
    <link href="/Styles/jquery-ui-1.8.10.custom.css" rel="stylesheet" type="text/css" />
    <script src="/Scripts/jquery-1.4.4.min.js" type="text/javascript"></script>
    <script src="/Scripts/jquery.datepick.js" type="text/javascript"></script>
    <script src="/Scripts/jquery.datepick-es-AR.js" type="text/javascript"></script>
    <script src="/Scripts/jquery-ui-1.8.10.custom.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $('#txtFechaDesde').datepick({ dateFormat: 'dd/mm/yyyy' });
            $('#txtFechaHasta').datepick({ dateFormat: 'dd/mm/yyyy' });
        });
    </script>
</asp:Content>
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Buscar Temporadas
    </h2>
    <div class="editionContainerFilter">
        <p>
            <span class="title">Fecha Desde:</span>
            <asp:TextBox ID="txtFechaDesde" runat="server" ClientIDMode="Static" CssClass="inputs"></asp:TextBox>
        </p>
        <p>
            <span class="title secondColumn">Estado:</span>
            <asp:DropDownList ID="cboEstado" runat="server" CssClass="cbo">
                <asp:ListItem Text="Todos" Value="Todos" Selected="True"></asp:ListItem>
                <asp:ListItem Text="Activas" Value="Activas"></asp:ListItem>
                <asp:ListItem Text="Inactivas" Value="Inactivas"></asp:ListItem>
            </asp:DropDownList>
        </p>
        <div class="clear">
        </div>
        <p>
            <span class="title">Fecha Hasta:</span>
            <asp:TextBox ID="txtFechaHasta" runat="server" ClientIDMode="Static" CssClass="inputs"></asp:TextBox>
        </p>
         <p>
            <span class="title secondColumn">Nombre:</span>
            <asp:TextBox ID="txtNombre" runat="server" ClientIDMode="Static" CssClass="inputs"></asp:TextBox>
        </p>
        <div class="clear">
        </div>
        <asp:LinkButton ID="lnkBuscar" runat="server" OnClick="lnkBuscar_Click">Buscar</asp:LinkButton>
        <a href="#" onclick="javascript:document.forms[0].reset();">Limpiar</a>
        <div class="clear">
        </div>
    </div>
    <h2>
        Listado de Temporadas        
    </h2>
    <asp:Panel ID="pnlResults" CssClass="editionContainerForGrid" runat="server">
        <asp:GridView ID="GridTemporadas" runat="server" CellPadding="4" ForeColor="#333333"
            GridLines="None" AutoGenerateColumns="False" DataKeyNames="Id" Width="100%" AllowPaging="True"
            OnPageIndexChanging="GridTemporadas_PageIndexChanging" OnRowCommand="GridTemporadas_RowCommand"
            OnRowDataBound="GridTemporadas_RowDataBound">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:ButtonField ButtonType="Image" CommandName="editar" ImageUrl="~/Images/editar.png"
                    Text="Button" AccessibleHeaderText="editar">
                    <HeaderStyle HorizontalAlign="Left" Width="30px" />
                    <ItemStyle HorizontalAlign="Center" />
                </asp:ButtonField>
                <asp:TemplateField HeaderText="">
                    <HeaderStyle HorizontalAlign="Left" Width="30px" />
                    <ItemStyle HorizontalAlign="Center" />
                    <ItemTemplate>
                        <asp:ImageButton ID="btnEliminar" 
                            runat="server" ImageUrl="~/Images/eliminar.png" CommandName="eliminar" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="Id" HeaderText="Id">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="Nombre" HeaderText="Nombre">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="FechaDesde" HeaderText="Inicio">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="FechaHasta" HeaderText="Fin">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="NumeroSemanas" HeaderText="Semanas">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:CheckBoxField DataField="Activa" HeaderText="Activa">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:CheckBoxField>
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#4b6c9e" Font-Bold="True" ForeColor="White" HorizontalAlign="Left" />
            <PagerStyle BackColor="#4b6c9e" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
    </asp:Panel>
    <asp:LinkButton ID="btnAgregarNuevo" CssClass="agregarNuevo" runat="server" OnClick="btnAgregarNuevo_Click">Agregar</asp:LinkButton>
</asp:Content>
